<template>
	<div class="home content">
		<nav>

			<el-radio-group v-model="isCollapse" style="margin-bottom: 20px;">
				<el-radio-button :label="false">展开</el-radio-button>
				<el-radio-button :label="true">收起</el-radio-button>
			</el-radio-group>
			<!-- 菜单 -->
			<el-menu	:default-active="$route.path"	class="el-menu-vertical-demo" 	@open="handleOpen" 	@close="handleClose" 	:collapse="isCollapse" router>

					<el-submenu index="0">
							<template slot="title">
								<i class="el-icon-ali-keyuan"></i>
								<span>客源</span>
							</template>
							<el-menu-item index="/resources">客源管理</el-menu-item>
							<el-menu-item index="/resourcefollow">跟进管理</el-menu-item>
					</el-submenu>

					<el-submenu index="1">
							<template slot="title">
								<i class="el-icon-ali-fangyuan"></i>
								<span>房源</span>
							</template>
							<el-menu-item index="/room">房源管理</el-menu-item>
							<el-menu-item index="/roomfollow">跟进管理</el-menu-item>
					</el-submenu>

					<el-menu-item index="/buildingdictionary">
						<i class="el-icon-ali-zidian"></i>
						<span slot="title">楼盘字典</span>
					</el-menu-item>
					
					<el-menu-item index="/department">
						<i class="el-icon-ali-bumen"></i>
						<span slot="title">部门管理</span>
					</el-menu-item>

					<el-menu-item index="/employee">
						<i class="el-icon-ali-ygpzgl"></i>
						<span slot="title">员工管理</span>
					</el-menu-item>
					
					<el-menu-item index="/duties">
						<i class="el-icon-ali-ygpzgl"></i>
						<span slot="title">职务管理</span>
					</el-menu-item>
					
					<el-menu-item index="/rankings">
						<i class="el-icon-ali-kaoqinguanli"></i>
						<span slot="title">打卡管理</span>
					</el-menu-item>

					<el-menu-item index="/worksummary">
						<i class="el-icon-ali-gongzuozongjie"></i>
						<span slot="title">工作总结</span>
					</el-menu-item>
				
					<el-menu-item index="/contract">
						<i class="el-icon-ali-hetongguanli"></i>
						<span slot="title">合同管理</span>
					</el-menu-item>

					<el-menu-item index="/earnestmoney">
						<i class="el-icon-ali-yajin"></i>
						<span slot="title">诚意金管理</span>
					</el-menu-item>

					<el-submenu index="2">
							<template slot="title">
								<i class="el-icon-ali-tongji"></i>
								<span>排行榜</span>
							</template>
							<el-menu-item index="/achievementranking">业绩排行</el-menu-item>
							<el-menu-item index="/entryroomranking">录入房源排行</el-menu-item>
							<el-menu-item index="/entryresourcesranking">录入客源排行</el-menu-item>
							<el-menu-item index="/roomfollowranking">房源跟进排行</el-menu-item>
							<el-menu-item index="/resourcesfollowranking">客源跟进排行</el-menu-item>
					</el-submenu>

					<el-submenu index="3">
							<template slot="title">
								<i class="el-icon-ali-zhuanyiquanxian"></i>
								<span>公司房客转移</span>
							</template>
							<el-menu-item index="/automatictransferrule">自动转房客规则</el-menu-item>
							<el-menu-item index="/stafftransfertenant">员工转房客</el-menu-item>
							<el-menu-item index="/publictransferprivate">私盘转公盘</el-menu-item>
					</el-submenu>
					
					<el-menu-item index="/log">
						<i class="el-icon-ali-rizhi"></i>
						<span slot="title">日志</span>
					</el-menu-item>

					<el-submenu index="4">
							<template slot="title">
								<i class="el-icon-ali-huishouzhan"></i>
								<span>回收站</span>
							</template>
							<el-menu-item index="/reclaimresources">客源</el-menu-item>
							<el-menu-item index="/reclaimhourse">房源</el-menu-item>
							<el-menu-item index="/reclaimbuildingdictionary">楼盘字典</el-menu-item>
							<el-menu-item index="/reclaimdepartment">部门</el-menu-item>
							<el-menu-item index="/reclaimstaff">员工</el-menu-item>
							<el-menu-item index="/reclaimsummary">工作总结</el-menu-item>
					</el-submenu>
			</el-menu>

		</nav>
		<!-- 内容 -->
		<div class="view-content">
				<router-view></router-view>
		</div>

	</div>
</template>
<script>
	import "../style/home.css";

  export default {
    name:"home",

    data() {
      return {
        isCollapse: true
      };
    },
    methods: {
      handleOpen(key, keyPath) {
        // console.log(key, keyPath);
      },
      handleClose(key, keyPath) {
        // console.log(key, keyPath);
			},
    },
    mounted (){

				window.onbeforeunload = () => {
						return (() => {

								
							
						})()
				}
    },
  }
</script>
